Repository navigation
Bound suggested outcomes in native quota openings - #9005
loopx-agent wants to merge 2 commits into
Conversation
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI (runtime_reported, max)
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
[P2] 首读省略验收正文时明确要求补读父路径
同一 ready receipt、两个已有精确支撑地址的大型建议项,base 的首读及连续页给出两段正文,head 两段均省略。当前说明仍称保留完整要求,还把补读描述成历史和评审细节。请在省略分支同步告知这两个父路径需在依赖工作前读完整。 相关代码
动机 / Motivation
使用 native progressive context 的 Agent 需要先读当前验收条件,再做依赖该条件的工作。大批建议项会占用多个首读页。当前提交在原回执和支撑地址匹配时只展开索引,保留原始 capture。缩短首读后,Agent 仍应能从本次现有命令辨认哪些是必要正文,并在行动前补读。独立验证覆盖 quota_packet 兼容展示入口及本次 capture 的精确恢复。
改动思路 / Approach
TypeScript owner 负责建议项 selection。Python 适配器把现有首读输出预算传给 planner,原回执与驱动器仍拥有 capture 和读回。本次影响的是首读内容及 agent-facing 说明。独立对照跨过真实 CLI reader,验证了缩短前后和同源补读。小批量、未就绪和无法核实支撑来源的分支继续展开正文。显式 initial read 和原 capture 可用同一权限范围读回完整验收。
具体改动 / Changes
精确 head 4b8b5b34036d0b1a0ce3a67cadd4337bad4995b7,diff base 7bc56e74687a93ff4d5bcccb532c454bf2379c29,6 个文件 +127/-12。逐项复核 bounded-ready-opening、complete-recovery、before-work-disclosure。验收约定
关键代码讲解
- Python 仅在 native progressive plan 里传入现有输出预算。源码
- 大批建议项超过窗口时,分支保留 ID、objective 和 revision,并省略正文。源码
- 同一首读说明仍声称已保留完整要求,引用的是支撑材料指引。源码
对主干的风险 / Risks
在两条合成建议项上读完所有首读页,base 的两段要求均可见,head 的两段均从当前阅读计划消失。当前已保留原始回执及停止条件,显式选父路径可找回正文。依赖场景里的风险是模型把这次视图已经读完当成相关要求已经读完。
语义与 CI 对齐
7 项聚焦测试通过,另有两次实际 CLI 成对观测。首读与其连续页从 33,369 字节四页降至 12,248 字节两页。该测量未计必要补读,完整成本和模型行动未验收。
我的整体评价 / Verdict
请调整本次首读的告知后复验。能从原 capture 恢复两段正文,也需要在当前首读明确正文尚待读取。建议用同一分支生成所需父路径的读法,再把成对试验扩到告知与正文同时相符。
English verdict: REQUEST_CHANGES. In the matched CLI replay, the ready native opening omits both applicable bodies while claiming the requirements are complete. Show the required exact parent reads before dependent work and retain the verified recovery.
Signed-off-by: LoopX Agent <[email protected]>
Signed-off-by: LoopX Agent <[email protected]>
4b8b5b3 to
0341075
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | Gemini | Google | self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
精确审查提交:0341075d068e357ce18aeb1813778142ad863a18。
动机
受影响方为依赖配额上下文与已保存上下文读取命令的原生宿主调用方,以及构建文档站点的维护者。此前当就绪任务带有四个较长的建议验收项并需要一次完整读取时,系统会连续输出四页并内联完整正文;此前旧分支省略正文后却继续声称已保留完整要求,而当前改动改为在三页精简摘要中标明每个待补读父路径并保留原捕获按需全量恢复。实测大建议批次在首读窗口内收窄为三页摘要并列明缺省父路径与操作顺序,同时小批次、未就绪任务、未知支撑来源及按需全量恢复均保持完整输出,文档站点链接也能正确解析。本改动不改变配额准入、任务认领、结算语义以及显式全量恢复路径的原有契约。
改动思路
由控制平面唯一决定是否延迟展开建议项并生成待补读父路径指令,再经既有摘要固定渲染通道原样透传给读取器。当前改动严格收敛在原生首读建议项折叠与指令提示范围,不改变小批次、未就绪任务、全量恢复或权限结算语义。同时在变基到最新 origin/main 时移除了已被 #9017 覆盖的冗余检查点测试,并把 turn-envelope-v0.md 断行的基准测试指南链接合并为单行以便站点生成器重写。
| 路径与条件 | 变基前 / origin/main 行为 |
精确 HEAD 0341075d068e357ce18aeb1813778142ad863a18 行为 |
|---|---|---|
| 就绪 + 大建议项 + 已核验支撑源 + 12KB 首读 | 展开全部建议项正文(实测 4 页 / 47,801 字节) | 仅保留 id/objective/revision,说明列出待补读父路径(实测 3 页 / 29,509 字节) |
| 小批次 / 未就绪 / 未知来源 / 64KB 预算 | 展开完整正文与原始完整性说明 | 保持完全一致,不产生 opening_context_instruction |
recovery.command --initial-read / --select |
从原 capture 恢复完整上下文 | 从同一不可变 capture 恢复完整正文且不消耗未读父路径 |
具体改动
依据协议文档 docs/reference/protocols/quota-cli-hot-path-compaction-v0.md(参照修订 1c540c3e5ae059f974abdfcfe27b42f5cad9e992),四项规格准则在本精确 HEAD 均已实现并核验:bounded_ready_suggested_opening(implemented)、omitted_parent_disclosure_and_before_work_read(implemented)、small_unready_unknown_and_recovery_fallback(implemented)与 frontstage_runtime_guide_link(implemented)。本次共变更 12 个文件(+429/-39 行):生产代码 8 个文件(+139/-37 行),协议文档 2 个文件(+18/-1 行),TS 与 Python 回归测试 2 个文件(+272/-1 行),无机械迁移或生成产物。
关键代码讲解
deferredOutcomesInstruction(loopx/control_plane/quota/progressive_context.ts:811):在存在deferredSuggestedOutcomes时提取context_details.instruction,将常量COMPLETE_REQUIREMENTS_CLAUSE替换为显式缺省父路径列表及在依赖工作前从recovery.command按--select回读完整正文的精确指引。initialContextReadGroups(loopx/control_plane/quota/progressive_context.ts:952):仅当ready结算回执匹配、所有建议项具备已知支撑地址且超出openingBudget时省略正文并收集deferredSuggestedOutcomes,否则保持原有全量选择。prepare_codex_context(loopx/control_plane/turn_driver/codex_context.py:905):接收可选max_page_output_bytes,结合#9048的<pointer>模板向 TypeScript 传入min(output_bytes, max_page_output_bytes),空值仍回退NATIVE_CONTEXT_FIRST_READ_FALLBACK_BYTES。write_initial_context_read_reference(loopx/control_plane/turn_driver/decision_capture.py:794):在渲染首读字节时仅替换/context_details/instruction,并将goal_presented与指令替换分离,避免误设present_goal_narrative,拆分出来的remaining选择自动清除opening_context_instruction。_validate_pinned_selection(loopx/cli_commands/quota_context_reader.py:258):允许并严格校验可选opening_context_instruction,要求其为非空字符串、list_fields与initial_read为假且选择列表包含/context_details/instruction,否则 fail-closed 报错。
对主干的风险
当前改动集中在原生首读窗口渲染边界与两处文档修正,具有明确生产调用方(quota_capture.py:250、quota_native_context.py:277、quota_context_reader.py:732)。强回归风险在于拆分后的后续页面或不含 /context_details/instruction 的显式选择误用首读替换文案;通过 decision_capture.write_initial_context_read_reference 对选中指针及 presented 集合的逐项绑定、以及 _validate_pinned_selection 的字段校验与 SHA-256 校验可确定拦截。状态判定完全复用 execution_preparation.state === 'ready'、settlement_identity 等值比较与 BARE_SHA256_PATTERN,不引入子串分类器。default_off_isolation 已通过小批次、未就绪、未知来源及 64KB 对照用例证明禁用态完全一致;文案领域中立且保留完整目标/停机/核验硬义务。全部必需验证在精确 HEAD 0341075d068e357ce18aeb1813778142ad863a18 通过:tsc 0 错误(PASS)、受影响 4 个 TS 文件 131/131 与全量 control_plane_ts 6669/6760 通过含 91 项 Postgres 环境跳过(PASS)、9 组配额上下文 Python 测试 690/704 通过含 14 项 LOOPX_NATIVE_CHECKPOINT_BIN 外部二进制跳过(PASS)、test_capability_documentation.py 6/6 与链接重写检查通过(PASS)、ruff 与 RFC 双语diff 与 loopx check 通过(PASS)、临时 node_modules 清理守卫下 semantic-vocabulary-drift-smoke.py 通过(PASS)、change-quality 回执 cqr_36c0c55306d92c8b5394 有效(PASS);未咨询远端 CI(wait_for_ci=false),另外无 node_modules 的 worktree 直接执行 canary premerge 会因缺乏本地 typescript 依赖在 semantic-vocabulary-drift-smoke.py 报错(UNVERIFIED,已在独立守卫运行中核实通过)。
我的整体评价
对长程推进(long_horizon: improved)与用户体验(user_experience: improved)均产生正向收益,在缩短首读体积的同时消除了此前遗留的非真实完整性声称并完整保留同 capture 回读路径;visual_review 为 not_applicable(纯 CLI JSON 选择协议与文档链接修复,经核对不含渲染 UI 变更,unverified_scope: none)。基线与精确 HEAD 的对比证明 observable_semantics 属于已核验的预期收敛;代码增删集中在现有唯一决策/渲染链路(code_volume: necessary,保留既有引用兼容性),结构比例得当(change_proportionality: proportionate),默认隔离与权限语义对齐(default_off_isolation: isolated,authority_semantics: aligned),新增元数据仅作用于本地临时选择与计划结构(semantic_alignment: aligned / local_only)。残余边界仅限未安装 LOOPX_NATIVE_CHECKPOINT_BIN 与 Postgres 服务的跳过项及无 node_modules worktree 下的 canary 依赖限制;针对此前评审 5966103483 与未决讨论 PRRT_kwDOStEbEs65OrN1 所指问题已在 0341075d068e357ce18aeb1813778142ad863a18 彻底修复并经实证闭环。
English verdict: APPROVE
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
动机 / Motivation
Agent 需要先选出候选,再在处理该候选前读取完整验收和写入约束。 大批建议正文会占满初读窗口。主干已经处理了另一条相关分支,让未绑定 Turn 在有限首读中仍能看见候选。 同一份捕获、同样的未绑定工作分支选择,用主干原有的两种真实 CLI 场景核对。当前主干在首读给出可操作候选,详情里的写入范围按需补读。旧分叉基线和本头均缺少 /action_portfolio/suggested_actions,两例都失败。 此提案在已准备 Turn 首读保留建议验收项的 ID、目标和版本,并给出完整父路径与补读义务。原先容易被误解为已完整阅读的提示已修正。 本地验证覆盖原生 CLI 和 SQLite 真实捕获。发布后的流量、完整成本与长程收益还需另行量化。
改动思路 / Approach
保留现有 TypeScript 读取计划和不可变捕获,从现有指针派生首读与补读。 由首读计划决定呈现次序。原始要求、授权和写入资格沿现有所有者校验。 在同一计划里继承主干两类分支的门控即可,已有同源 reader 足以提供完整要求。
具体改动 / Changes
逐项检查当前头 0341075 和 merge base 898c9ef,12 个文件,+429/-39。主干 a6ffb3b 的整合预演在上下文编排、捕获 CLI 和 Turn Envelope 文档发生冲突。文档合并时可直接继承主干已经修好的协议链接。 评审依据为 0341075。 目标规范
ready-parent-disclosure· Only qualified ready turns may compact large addressed outcomes, with exact parent paths.source-bound-recovery· Read every applicable omitted requirement from its original capture before dependent work.unbound-candidate-order· Keep ordinary choices in the first bounded slice and read heavy candidate scopes on request.
关键代码讲解
- 精确补读提示 列出被省略的父路径和依赖工作前的补读动作。
- 首读计划 组合已消费索引、候选和后续读取说明。
- 压缩条件 按启用状态、首读预算和已知地址选择轻量字段。
- CLI 恢复入口 保留有界首读与同源后续读取。
对主干的风险 / Risks
[P2] 整合时保留主干未绑定 Turn 的首读可选候选。 整合到当前 main,继承 #9078 对候选与写入范围的拆分,再接入 ready Turn 的验收正文延后逻辑。同一集成头同时通过两个未绑定用例和已准备 Turn 的省略与完整补读用例。 若冲突处理直接采用旧选择顺序,Agent 可能先收到一组大范围或继续补读提示,却看不到可用动作。
本头通过 131 项 TypeScript、284 项定向 Python 及相对原分叉点的本地 quick premerge。另单独复跑 6 项大批验收场景,覆盖已准备条件、精确父路径提示和同源补读。 故障证据覆盖需要 worktree 和独立 worktree 两种输入。当前主干 2 项通过,原分叉点和提案各 2 项失败。 当前合入预演有冲突,暂无可验证的合并产物。
我的整体评价 / Verdict
请求修改。保留现有 TypeScript 读取计划和不可变捕获,从现有指针派生首读与补读。 由首读计划决定呈现次序。原始要求、授权和写入资格沿现有所有者校验。 已准备场景的提示修复有验证。与当前主干组合后的初读可操作性仍未验收。 请在整合头复验两种未绑定候选,以及大批建议正文的精确补读。
English verdict: REQUEST_CHANGES at 0341075. The ready-turn deferral and exact parent disclosure are verified at this head. Both unbound candidate opening cases pass on current main and fail at the old fork and this head. Integrate the current candidate-before-scope ordering and verify both paths together.
| const ordinaryRows = openingSplit ? (plan.selections as ReadSelection[]).reduce((end, row, index) => | ||
| groups.opening.some(field => field === row.pointer || field.startsWith(row.pointer + "/")) | ||
| ? index + 1 : end, 0) : undefined; | ||
| const deferredOutcomes = groups.deferredSuggestedOutcomes ?? []; |
There was a problem hiding this comment.
[P2] 整合时保留主干未绑定 Turn 的首读可选候选。同一份捕获、同样的未绑定工作分支选择,用主干原有的两种真实 CLI 场景核对。当前主干在首读给出可操作候选,详情里的写入范围按需补读。旧分叉基线和本头均缺少 /action_portfolio/suggested_actions,两例都失败。 整合到当前 main,继承 #9078 对候选与写入范围的拆分,再接入 ready Turn 的验收正文延后逻辑。同一集成头同时通过两个未绑定用例和已准备 Turn 的省略与完整补读用例。
Problem
A ready native Turn can receive a large batch of suggested outcomes from relationship navigation. Loading every full suggested requirement body into the generated opening pages adds unnecessary opening output even when the current decision only depends on a subset, while omitting those bodies without updating
/context_details/instructionfalsely leaves the opening claiming complete inline requirements.Change
progressive_context.ts, use the native opening output budget to project a large suggested-outcome batch by/id,/objective, and/revisionwhen the ready receipt and every supporting address match./context_details/instructioncompleteness claim (COMPLETE_REQUIREMENTS_CLAUSE) viaopening_context_instructionso the opening lists the exact omitted parent paths (deferred_suggested_outcomes) and directs callers to read applicable complete outcomes from the same immutablerecovery.commandbefore dependent work.max_page_output_bytesand digest-pinnedopening_context_instructioncleanly acrosscodex_context.py,decision_capture.py,native_first_read.py,native_context_selection.py,quota_capture.py,quota_context_reader.py, andquota_native_context.pywithout changingrequired-context.jsonorrecovery.command --initial-read.docs/reference/protocols/quota-cli-hot-path-compaction-v0.mdto specify the parent-path disclosure and before-dependent-work read contract.[runtime guide](../../../benchmark/runtime/RUNTIME.md)link indocs/reference/protocols/turn-envelope-v0.mdsodocs/capability_docs.pyrewrites it cleanly to the repository blob URL.origin/main(dropping the checkpoint preflight test already landed via#9017).Validation
tsc --project tsconfig.control-plane.json --noEmitpassed; 131/131 affected cases inprogressive_context.test.ts,context_delivery.test.ts,context_selection.test.ts, andturn_envelope.test.tspassed (0 skipped); fulltests/control_plane_ts/*.test.tspassed 6669/6760 with 91 PostgreSQL-gated skips.LOOPX_NATIVE_CHECKPOINT_BIN-gated skips across 9 context/quota suites (test_context_first_read.py,test_progressive_native_context.py,test_saved_context_project.py,test_context_read_reference.py,test_quota_decision_capture.py,test_codex_context_lifecycle.py,test_context_unread_reachability.py,test_native_context_delivery_cost.py,test_quota_authority_settlement_journey.py) plus 6 passed intest_capability_documentation.py.ruff checkon all 8 changed Python files passed,scripts/check_rfc_bilingual.py --base origin/main --head HEADpassed,git diff --check origin/main...HEADpassed,loopx check --scan-path ...passed (12 files clean),examples/semantic-vocabulary-drift-smoke.py,examples/control_plane/control-plane-maintainability-ratchet-smoke.py, andexamples/control_plane/quota-scheduler-state-ack-smoke.pypassed./id//objective//revision, drop"This view retains complete requirements", and instruct reading omitted parent paths before dependent work.personal-loopx-maintenance):cqr_36c0c55306d92c8b5394(decision: "pass").